package com.lyz.dataStructure.LeetCode.dongtaiguihua;
import java.util.Scanner;

/*
leetcode 343  整数分割
 */
public class Solution6 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        System.out.println( integerBreak(n));
    }

    public static int integerBreak(int n){
        if(n<=2) return 1;
        if(n==3) return 2;
        if(n==4) return 4;
        int res = 1;
        while(n>4){
            res = res*3;
            n=n-3;
        }
        res =res*n;
        return res;
    }
}
